package com.zbkj.crmeb.store.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.PageParamRequest;
import com.github.pagehelper.PageInfo;
import com.zbkj.crmeb.system.model.SystemAdmin;
import com.zbkj.crmeb.system.request.SystemAdminAddRequest;
import com.zbkj.crmeb.system.request.SystemAdminRequest;
import com.zbkj.crmeb.system.response.SystemAdminResponse;


/**
 * 功能描述: 员工档案
 * @Author: wangzh
 * @Date: 2022/11/24 15:46
 */
public interface EmployeeFileService extends IService<SystemAdmin> {

    /**
     * 功能描述: 新增员工账号
     * @Param: [systemAdminAddRequest]
     * @Return: java.lang.Boolean
     * @Author: wangzh
     * @Date: 2022/11/24 18:07
     */
    Boolean saveEmployeeAccount(SystemAdminAddRequest systemAdminAddRequest) throws Exception;

    /**
     * 功能描述: 修改员工账号
     * @Param: [systemAdminRequest]
     * @Return: java.lang.Boolean
     * @Author: wangzh
     * @Date: 2022/11/24 18:07
     */
    Boolean updateEmployeeAccount(SystemAdminRequest systemAdminRequest) throws Exception;

    /**
     * 功能描述: 分页查询员工档案信息/根据工号、姓名、角色模糊查询员工
     * @Param: [request, pageParamRequest]
     * @Return: com.github.pagehelper.PageInfo<com.zbkj.crmeb.system.response.SystemAdminResponse>
     * @Author: wangzh
     * @Date: 2022/11/24 18:07
     */
    PageInfo<SystemAdminResponse> getEmployeeAccountByCode(SystemAdminRequest request, PageParamRequest pageParamRequest);

    /**
     * 功能描述: 获取主账号名称
     * @Param: [merId]
     * @Return: java.lang.String
     * @Author: wangzh
     * @Date: 2022/11/25 9:49
     */
    String getPrimaryAccountName(String merId);

    /**
     * 功能描述: 根据id删除账号
     * @Param: [id]
     * @Return: java.lang.Boolean
     * @Author: wangzh
     * @Date: 2022/11/25 10:19
     */
    Boolean deleteEmployAccount(Integer id);

    /**
     * 功能描述: 根据id查询账号信息
     * @Param: [id]
     * @Return: com.zbkj.crmeb.system.response.SystemAdminResponse
     * @Author: wangzh
     * @Date: 2022/11/29 10:19
     */
    SystemAdminResponse getEmployAccountById(Integer id) throws Exception;
}
